Skip to content

refactor(estree/tokens): add TokenType type#19789

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/02-26-refactor_estree_tokens_add_tokentype_type
Feb 27, 2026
Merged

refactor(estree/tokens): add TokenType type#19789
graphite-app[bot] merged 1 commit intomainfrom
om/02-26-refactor_estree_tokens_add_tokentype_type

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented Feb 26, 2026

Refactor. Add a TokenType type which represents the type of a token. It's purely a wrapper around a &'static str, except that it enforces a maximum length on the string.

This invariant is used in #19744 to avoid overflow checks when calling CodeBuffer::print_strs_array.

@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Feb 26, 2026
Copy link
Copy Markdown
Member Author

overlookmotel commented Feb 26, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 26, 2026

Merging this PR will not alter performance

✅ 52 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing om/02-26-refactor_estree_tokens_add_tokentype_type (576c090) with om/02-26-feat_estree_add_is_compact_const_to_formatter_trait (d55eb11)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

This was referenced Feb 26, 2026
This was referenced Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter-plugins Area - Linter JS plugins A-parser Area - Parser C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants